
<%@ page import="com.carmanagement.User" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'user.label', default: 'User')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
		<nav>			
			<div class="link">
				<ul>
					<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>				
					<sec:ifLoggedIn>
						<li>
							${message(code: 'welcome.message', default: 'Welcome ')} <sec:username/>!						
							<form name="logout" method="POST" action="${createLink(controller:'logout') }">
								<input type="submit" value="logout">
							</form>
						</li>
					</sec:ifLoggedIn>
					<sec:ifNotLoggedIn>
						<li><g:link controller='login' action='auth' class="login">Login</g:link></li>
					</sec:ifNotLoggedIn>
				</ul>
			</div>			
		</nav>
		welcome
		<p>
			<g:link controller="user" action="create"><g:message code="user.create.label" default="new user"/></g:link>
		</p>
	</body>
</html>
